import { IsNotEmpty, IsNumber, IsOptional, MaxLength } from 'class-validator'
import i18n, { i18nMessage } from '@/i18n'
import { ApiProperty } from '@nestjs/swagger'

export class MetaPlatformUpdateByIdDto {
  @ApiProperty({ description: 'ID', type: String })
  @IsNotEmpty()
  @IsNumber()
  id: number

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-platform-update-by-id.12151161-0'), type: String })
  @MaxLength(64, { message: i18nMessage() })
  label: string

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-platform-update-by-id.12151161-1'), type: String })
  @MaxLength(128, { message: i18nMessage() })
  @IsOptional()
  domainUrl?: string

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-platform-update-by-id.12151161-2'), type: String })
  @MaxLength(256, { message: i18nMessage() })
  @IsOptional()
  resourceChartUrl?: string

  @ApiProperty({ description: i18n.t('dto.meta-platform-update-by-id.876661-0'), type: String })
  @MaxLength(256, { message: i18nMessage() })
  @IsOptional()
  resourceHistoryChartUrl?: string

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-platform-update-by-id.12151161-3'), type: String })
  @MaxLength(256, { message: i18nMessage() })
  @IsOptional()
  resourceModuleActionUrl?: string

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-platform-update-by-id.12151161-4'), type: String })
  @MaxLength(256, { message: i18nMessage() })
  @IsOptional()
  getRealtimeDataUrl?: string

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-platform-update-by-id.12151161-5'), type: String })
  @MaxLength(256, { message: i18nMessage() })
  @IsOptional()
  authUrl?: string

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-platform-update-by-id.12151161-6'), type: String })
  @MaxLength(256, { message: i18nMessage() })
  @IsOptional()
  wsAuthUrl?: string

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-platform-update-by-id.12151161-7'), type: String })
  @MaxLength(256, { message: i18nMessage() })
  @IsOptional()
  sendCommandUrl?: string

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-platform-update-by-id.12151161-8'), type: String })
  @MaxLength(256, { message: i18nMessage() })
  @IsOptional()
  getBindDataSourceUrl?: string

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-platform-update-by-id.12151161-9'), type: String })
  @MaxLength(256, { message: i18nMessage() })
  @IsOptional()
  getBindDataSourceTypeUrl?: string

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-platform-update-by-id.12151161-10'), type: String })
  @MaxLength(256, { message: i18nMessage() })
  @IsOptional()
  verifyControlPasswordUrl?: string
}
